GDF=../../../scripts/GDF.pl
NAO=../../../bin/nao2giza
symm=`cat ../../info/symm.var`
wa_gold=`cat ../../info/wa-gold.var`

echo "start to symmetrization..."

if [ ${symm} == "st" ]; then
	rm -rf wa-all.*
	ln -s `pwd`/st-all.giza `pwd`/wa-all.giza
	ln -s `pwd`/st-all.nao `pwd`/wa-all.nao
	echo "done"
	exit

else

	rm -rf wa-symm; mkdir wa-symm;
	time perl ${GDF} st-all.nao ts-all.nao src.tok tgt.tok wa-symm;

	if [ ${symm} == "int" ]; then
		mv wa-symm/INTERSECTION.txt wa-all.nao
	fi
	if [ ${symm} == "uni" ]; then
		mv wa-symm/UNION.txt wa-all.nao
	fi
	if [ ${symm} == "gdf" ]; then
		mv wa-symm/GROW_DIAG_FINAL.txt wa-all.nao
	fi

	${NAO} wa-all.nao st-all.giza wa-all.giza
fi

echo "done"

